package com.example.config;

import org.apache.ibatis.session.Configuration;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;

/**
 * <h3>springboot-mybatis</h3>
 * <p></p>
 *
 * @author : 你的名字
 * @date : 2020-03-02 20:41
 **/
@org.springframework.context.annotation.Configuration
public class MybatisConfig {
    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return new ConfigurationCustomizer() {
            @Override
            public void customize(Configuration configuration) {
                //驼峰命名法
                configuration.setMapUnderscoreToCamelCase(true);
            }
        };
    }
}
